
testPrinter(
'a = {}',

'a = {};',

'a={}'
);

testPrinter(
'a = {asdf: null}',

'a = {\n\
	asdf: null\n\
};',

'a={asdf:null}'
);

testPrinter(
'a = {a: 1, b: 2}',

'a = {\n\
	a: 1,\n\
	b: 2\n\
};',

'a={a:1,b:2}'
);

testPrinter(
'a = { throw: true }',

'a = {\n\
	"throw": true\n\
};',

'a={"throw":true}'
);

testPrinter(
'a = {get asdf() {return 1}}',

'a = {\n\
	get asdf() {\n\
		return 1;\n\
	}\n\
};',

'a={get asdf(){return 1}}'
);

testPrinter(
'a = {set asdf(x) {this._x = x}}',

'a = {\n\
	set asdf(x) {\n\
		this._x = x;\n\
	}\n\
};',

'a={set asdf(x){this._x=x}}'
);

testPrinter(
'[]',
'[ ];',
'[]'
);

testPrinter(
'[1]',
'[ 1 ];',
'[1]'
);

testPrinter(
'[1, 2]',
'[ 1, 2 ];',
'[1,2]'
);

testPrinter(
'[1, 2, ]',
'[ 1, 2 ];',
'[1,2]'
);

testPrinter(
'[1,,]',
'[ 1, , ];',
'[1,,]'
);

testPrinter(
'[,]',
'[ , ];',
'[,]'
);

testPrinter(
'a = { get "a b"() {}}',
'a = {\n\
	get "a b"() {}\n\
};',
'a={get "a b"(){}}'
);

testPrinter(
'a = { get "ab"() {}}',
'a = {\n\
	get ab() {}\n\
};',
'a={get ab(){}}'
);

testPrinter(
'a = { get 4() {}}',
'a = {\n\
	get 4() {}\n\
};',
'a={get 4(){}}'
);

// array comprehension
testPrinter(
'[i for (i in numbers)]',
'[ i for (i in numbers) ];',
'[i for(i in numbers)]'
);

testPrinter(
'[i * 2 for each (i in numbers)]',
'[ i * 2 for each (i in numbers) ];',
'[i*2 for each(i in numbers)]'
);

testPrinter(
'[i for each (i in numbers) if (i % 2 == 0)]',
'[ i for each (i in numbers) if (i % 2 == 0) ];',
'[i for each(i in numbers)if(i%2==0)]'
);
